| Class | AI::CSP::Problem |
| In: |
ai/csp/problem.rb
|
| Parent: | Object |
For modeling CSP problems in terms of variables (which have domains) and constraints over those variables.
See AI::CSP::Variable and AI::CSP::Constraint. Also, see AI::CSP for an overview and examples.
| constraints | [R] | |
| variables | [R] |
one of:
add_constraint(constraint)
add_constraint(v1, v2, ...) {|a,b,..| ...}
add_constraint(vname1, vname2. ...) {|a,b,...| ...}
Calls block with each constraint in the problem. If a variable is specified, restricts this to constraints involving that variable.